
<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
                require_once 'Mobile_Detect.php';
                
                
                
                $detect = new Mobile_Detect;
                
                if ($detect->isMobile() ) {
                    echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style>
        ul#menu li {
        display:inline;
         background-color: Blue;
        }
</style>
</head>

<body bgcolor="#2EFEF7">';
 
                echo '<div class="container" id="page">

        <div id="header">
        <center>
            
            </center>
           <!-- <h1 style="font-size:52px; " > CRPMS  </h1>--!>
                <div id="logo">
       </div>
        </div><!-- header -->';

        //echo'<div id="mainmenu">';
              echo' <center><ul id="menu" >';
              echo '<h1 style="font-size:80px;>';
                $this->widget('zii.widgets.CMenu',array(
                        'items'=>array(
                                array('label'=>'Home', 'url'=>array('/site/index')),
				array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
				array('label'=>'Contact', 'url'=>array('/site/contact')),
				array('label'=>'Employee', 'url'=>array('/employee'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Medicine Location', 'url'=>array('/medicinelocation'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Order Detail', 'url'=>array('/orderdetail'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Order Header', 'url'=>array('/orderheader'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Prescription Detail', 'url'=>array('/prescriptiondetail'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Prescription Header', 'url'=>array('/prescriptionheader'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Product', 'url'=>array('/product'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Receipt', 'url'=>array('/receipt'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Patient', 'url'=>array('/patient'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Pharmacy', 'url'=>array('/Pharmacy'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Inventory', 'url'=>array('/Inventory'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Employee Log', 'url'=>array('/Employeelog'), 'visible'=>!Yii::app()->user->isGuest),
				//array('label'=>'customer_has_order', 'url'=>array('/customer_has_order'), ' visible'=>Yii::app()->user->isGuest),
				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
			),
		)); ?>
                                
                        ),
                ));
                echo '</h1>';
                echo '</ul></center>';
                //Mobile
               // echo '</div><!-- mainmenu -->';
                ?>

    <?php if(isset($this->breadcrumbs)):?>
                <?php $this->widget('zii.widgets.CBreadcrumbs', array(
                        'links'=>$this->breadcrumbs,
                )); ?><!-- breadcrumbs -->
        <?php endif?>

        <center><h1 style="font-size:32px"><?php echo $content; ?></h1></center>

        <div class="clear"></div>
        </br>
        </br>
                <?php
              echo'  <div id="footer">
                  <center>
                <h1>Copyright &copy;';  echo date('Y'); echo' by CRPMS<br/>
                All Rights Reserved.<br/>
                Powered by: CRPMS</h1>
                </center>
        </div><!-- footer -->';
                
                }  else {
                    

                ?>
    
    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />

        <!-- blueprint CSS framework -->
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
        <!--[if lt IE 8]>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
        <![endif]-->

        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>





        <div id="mainmenu">
                <?php $this->widget('zii.widgets.CMenu',array(
                        'items'=>array(
                                array('label'=>'Home', 'url'=>array('/site/index')),
                                array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                                array('label'=>'Contact', 'url'=>array('/site/contact')),
                                array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
                        ),
                )); ?>
        </div><!-- mainmenu -->
        
        <!-- Submenu -->
        <div id="mainmenu">
                <?php $this->widget('zii.widgets.CMenu',array(
                        'items'=>array(
                               
                                array('label'=>'Employee', 'url'=>array('/employee/index'),'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Medicinelocation', 'url'=>array('/medicinelocation/index'),'visible'=>!Yii::app()->user->isGuest),
                                
                                array('label'=>'Orderdetail', 'url'=>array('/orderdetail/index'),'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Orderheader', 'url'=>array('/orderheader/index'),'visible'=>!Yii::app()->user->isGuest),

                                array('label'=>'Prescriptiondetail', 'url'=>array('/prescriptiondetail/index'),'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Prescriptionheader', 'url'=>array('/prescriptionheader/index'),'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Product', 'url'=>array('/product/index'),'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Receipt', 'url'=>array('/receipt/index'),'visible'=>!Yii::app()->user->isGuest)
								array('Patient'=>'Patient', 'url'=>array('/patient/index'),'visible'=>!Yii::app()->user->isGuest)
								array('label'=>'Pharmacy', 'url'=>array('/pharmacy/index'),'visible'=>!Yii::app()->user->isGuest)
								array('label'=>'Inventory', 'url'=>array('/inventory/index'),'visible'=>!Yii::app()->user->isGuest)
                        ),
                )); ?>
                
        </div><!-- mainmenu -->
        <?php if(isset($this->breadcrumbs)):?>
                <?php $this->widget('zii.widgets.CBreadcrumbs', array(
                        'links'=>$this->breadcrumbs,
                )); ?><!-- breadcrumbs -->
        <?php endif?>

        <?php echo $content; ?>

        <div class="clear"></div>

        <div id="footer">
                Copyright &copy; <?php echo date('Y'); ?> by CRPMS<br/>
                All Rights Reserved.<br/>
                Powered by: CRPMS
                
        </div><!-- footer -->

</div><!-- page -->



</body>
</html>